#ifndef __G711_H_
#define __G711_H_

#ifdef __cplusplus
extern"C"
{
#endif
    
#include <stdio.h>
#include <stdbool.h>

int G711Decode(char* pRawData, char* pBuffer, int BufferSize, int type);
int G711EnCode(char* pCodecBits, char* pBuffer, int BufferSize, int type);
bool G711TypeChange(unsigned char* alawdata, unsigned char* ulawdata, int datasize, int type);
short alaw2linear(unsigned char a_val);
unsigned char alaw2ulaw(unsigned char aval);
unsigned char linear2alaw(short pcm_val);
unsigned char linear2ulaw(int pcm_val);
unsigned char ulaw2alaw(unsigned char uval);
int ulaw2linear(unsigned char u_val);




#ifdef __cplusplus
}
#endif

#endif

